import { COMMON_ITEM_TYPE_STYLE, CAROUSEL_ITEM_TYPE_STYLE} from '@/common/const-item-style';

export const CAROUSEL_ITEM_TYPES = [
  // { name: '图片用户', value: 'wb-item-img-user'},
 // { name: '通用列表项', value: 'wb-item-vote'},
  { name: '图文列表项', value: 'wb-item-common', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/carousel-common.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.carousel,
      },
    ],
  },
  { name: '奖品列表项', value: 'wb-item-reward', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/reward.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.reward,
      },
    ],
  },
  { name: '珠宝视频项', value: 'wb-item-jewellery-video', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/jewellery-video.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.jewelleryVideo,
      },
    ],
  },
  { name: '答题互动', value: 'wb-item-question', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/question.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.question,
      }
    ],
  },
  { name: '找不同', value: 'wb-item-find-different', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/find-different.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.findDiffernet,
      }
    ],
  },
  { name: '轮博选择', value: 'wb-item-swiper-select', 
    itemDatas:[
      { uiImgUrl:'images/items/demos/find-different.png',
        data: CAROUSEL_ITEM_TYPE_STYLE.swiperSelect,
      }
    ],
  }
]
export const CAROUSEL_ITEM_TYPES_MAP = {
  question: 'wb-item-question',
  different: 'wb-item-find-different',
  common: 'wb-item-common',
  reward: 'wb-item-reward',
  jewelleryVideo: 'wb-item-jewellery-video',
  swiperSelect: 'wb-item-swiper-select',
}
//77 好物进化论 wb-item-haowu 点赞 渐变背景
//202 七夕告白 wb-item-judge-right-wrong 判断题
//201 七夕柠檬树 wb-item-rank-friend 进度条
//370 热8 wb-item-vote 排行投票
//406 386 天猫双十一 wb-item-common
//337 趋势大赏 投票
//单选按钮组 wb-item-radio
//{ name: '单选按钮组', value: 'wb-item-radio'},
//{ name: '小图点击看大图', value: 'wb-big-img'},
//{ name: '好物进化论', value: 'wb-item-haowu'},
//{ name: '通用大图列表项', value: 'wb-item-common'},
//{ name: '通用列表项', value: 'wb-item-vote'},
//{ name: '多选按钮组', value: 'wb-item-checkbox'},
//{ name: '好友排行榜', value: 'wb-item-rank-friend'},
//{ name: '判断对错', value: 'wb-item-judge-right-wrong'},
//{ name: '趋势大赏', value: 'wb-item-qsds'},
//{ name: '趋势大赏投票', value: 'wb-item-qsds-vote'},
//下拉框option
export const COMMON_ITEM_TYPES = [
  { name: '图文列表类', value: 'wb-item-common', 
    itemDatas:[
      {
        uiImgUrl:'images/items/demos/common.png',
        data: COMMON_ITEM_TYPE_STYLE.common,
       },
       {
        uiImgUrl:'images/items/demos/common-reposts.png',
        data: COMMON_ITEM_TYPE_STYLE.commonReposts
       },
       {
        uiImgUrl:'images/items/demos/qsds.png',
        data: COMMON_ITEM_TYPE_STYLE.qsds
       },
    ],
  },
  { name: '长条列表类', value: 'wb-item-qsds-vote', 
    itemDatas: [
      {
        uiImgUrl:'images/items/demos/qsds-vote.png',
        data: COMMON_ITEM_TYPE_STYLE.qsdsVote
      },
      {
        uiImgUrl:'images/items/demos/vote.png',
        data: COMMON_ITEM_TYPE_STYLE.vote
      },
      {
        uiImgUrl:'images/items/demos/rank-friend.png',
        data: COMMON_ITEM_TYPE_STYLE.rankFriend
      },
    ]
  },
  { name: '多选按钮组类', value: 'wb-item-checkbox', 
    itemDatas: [
      {
        uiImgUrl:'images/items/demos/checkbox.png',
        data: COMMON_ITEM_TYPE_STYLE.checkbox
      }
    ]
  },
  { name: '判断对错类', value: 'wb-item-judge-right-wrong', 
    itemDatas: [
      {
        uiImgUrl:'images/items/demos/judge.png',
        data: COMMON_ITEM_TYPE_STYLE.judge
      }
    ],
  },
  { name: '点击收缩类', value: 'wb-item-header-footer', 
    itemDatas: [
      {
        uiImgUrl:'images/items/demos/header-footer.png',
        data: COMMON_ITEM_TYPE_STYLE.headerFooter
      },
    ],
  },
]
// radio: 'wb-item-radio',
//haowu: 'wb-item-haowu',
export const COMMON_ITEM_TYPE_MAP = {
  common: 'wb-item-common',
  img: 'wb-big-img',
  checkbox: 'wb-item-checkbox',
  judge: 'wb-item-judge-right-wrong',
  qsdsVote: 'wb-item-qsds-vote',
  headerFooter: 'wb-item-header-footer',
}
export const COMMON_ITEM_NEW_TYPES = [
  'wb-item-common', 'wb-big-img', 'wb-item-checkbox', 'wb-item-qsds-vote', 'wb-item-judge-right-wrong',
]
export const CAROUSEL_TYPES = [
  { name: '默认', value: '0'},
  { name: '一次显示多个滑块', value: '1'},
]
export const CAROUSEL_TYPES_MAP = {
  default: 0,
  slidesPerView: 1,
}
export const CAROUSEL_COLOR_TYPES = [
  { name: '白色系', value: 'white' },
  { name: '黑色系', value: 'black' },
  { name: '峰会金色系', value: 'gold' },
  // { name: '红色系', value: 'red' },
  // { name: '橙色系', value: 'orange' },
  // { name: '黄色系', value: 'yellow' },
  // { name: '绿色系', value: 'green' },
  // { name: '青色系', value: 'aqua' },
  // { name: '蓝色系', value: 'blue' },
  // { name: '紫色系', value: 'purple' },
]
export const CAROUSEL_POSITION_TYPE = [
  { name: '中部', value: '0'},
  { name: '上部', value: '1'},
]
export const CAROUSEL_POSITION_TYPE_MAP = {
  center: 0,
  top: 1,
}

export const COMMON_ITEM_STYLE_TYPE = [
  { name: '无', value: 0},
  { name: '京东热8', value: 1},
]
export const COMMON_ITEM_STYLE_TYPE_MAP = {
  no: 0,
  jd: 1,
}

export function getCommonData(data){
  let commonData = _.cloneDeep(data);
  commonData.forEach(commonItem => {
    commonItem.classStr = commonItem.value + '-style' ;
  })
  return commonData;
}
export const ITEM_FLEX_DIRECTION_MAP = {
  row: "row",
  column: "column",
}
export const ITEM_FLEX_DIRECTION = [
  { name: "纵向", value: "column" },
  { name: "横向", value: "row" },
]

export const LIST_TYPE = [
  { name: "通用列表", value: "1" },
  { name: "滚动条", value: "2" },
  { name: "翻页", value: "3" },
  { name: "3d旋转", value: "4" },
  { name: "点击显示隐藏", value: "5" },
]

export const LIST_TYPE_MAP = {
  commonList: "1",
  scroll: "2",
  carousel: "3",
  rotate: "4",
  relative: "5"
}